package city.spring.modules.medicine.vo;

import city.spring.modules.medicine.entity.MedicineInventoryEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author 谢金婷
 * @date 2020/7/27 0004 16:46
 * @see MedicineInventoryEntity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class MedicineInventoryVO extends MedicineInventoryEntity {
    /**
     * 该盘点计划关联的药品
     */
    private List<MedicineinventoryMedicineVO> medicines;
    /**
     * 该盘点计划关联的人员列表信息
     */
    private List<MedicineinventoryUserVO> users;

    public MedicineInventoryVO(MedicineInventoryEntity entity) {
        super.setId(entity.getId());
        super.setFounder(entity.getFounder());
        super.setNickname(entity.getNickname());
        super.setIsInventory(entity.getIsInventory());
        super.setInventory(entity.getInventory());
        super.setStarttime(entity.getStarttime());
        super.setEndtime(entity.getEndtime());
        super.setGmtCreate(entity.getGmtCreate());
        super.setGmtModified(entity.getGmtModified());
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
